package com.commit.service;

import com.commit.domain.Answer;
import com.commit.domain.Question;
import com.commit.domain.User;

import java.util.List;

/**
 * @author:zyh
 * @Time:2021-02-27-18:41
 * @email:1269231889@qq.com
 */
public interface UserService {

    void register(User user);

    User findByName(String loginName);

    User findById(Integer id);

    //查找用户的所有问题
    List<Question> allQuestion(String name);

    //查找所有回答
    List<Answer> allAnswer(String name);

    //采纳回答
    boolean accept(Integer id,Integer answerId,Integer questionId);
}
